<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<%@include file="/WEB-INF/common/taglibs.jsp"%>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="${ctx}resources/css/list.css" />
		<script type="text/javascript" src="${ctx}resources/js/page.js"></script>
		<script type="text/javascript" src="${ctx}resources/js/table.js"></script>
		<script type="text/javascript" src="${ctx}resources/js/um.js"></script>
		<title>江苏龙芯梦兰科技股份有限公司-SMT生产管理系统</title>
	</head>
	<script type="text/javascript">
		function autoTest(){
			if(confirm("自动检测将自动检测当前站点所有板子,确定要使用此功能吗？")){
				$.ajax({ 
			      url: "${ctx}board/topAutoTest.htm", 
			      global: false, 
			      type: "POST", 
			      dataType: "json", 
			      async:false, 
			      success: function(data){ 
			         if(data.msg=="Y"){
			        	 alert("操作成功!");
			        }
		     	 }
		  		 });
				 $("#mainForm").submit();
		    }
		}
		
		function topTest(bid){
			
			if(confirm("确定要检测吗？")){
				$.ajax({ 
			      url: "${ctx}board/topTest.htm", 
			      global: false, 
			      type: "POST", 
			      dataType: "json", 
			      async:false, 
			      data: ({"bid":bid}), 
			      success: function(data){ 
			         if(data.msg=="Y"){
			        	 alert("操作成功!");
			        }
		     	 }
		  		 });
				 $("#mainForm").submit();
		    }
		}
		
		function topNG(bid){
			if(confirm("确定要NG吗？")){
				$.ajax({ 
			      url: "${ctx}board/topNG.htm", 
			      global: false, 
			      type: "POST", 
			      dataType: "json", 
			      async:false, 
			      data: ({"bid":bid}), 
			      success: function(data){ 
			         if(data.msg=="Y"){
			        	 alert("操作成功!");
			        }
		     	 }
		  		 });
				 $("#mainForm").submit();
		    }
		}
	</script>
	<body>
		<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
			<form id="mainForm" action="${ctx}board/topList.htm" method="post">
				<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}" />
				<input type="hidden" name="page.orderBy" id="orderBy" value="id" />
				<input type="hidden" name="page.order" id="order" value="asc" />
				<tr>
					<td height="30">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="24" bgcolor="#353c44">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td>
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td width="6%" height="19" valign="bottom"> <div align="center"> <img src="${ctx}resources/images/tb.gif" width="14" height="14" /> </div></td>
														<td width="94%" valign="bottom"> <span class="STYLE1"> 订单基本信息列表</span> </td>
													</tr>
												</table>
											</td>
											<td>
												<div align="right">
													<span class="STYLE1"> 
														<smt:verify authority="order_add"><span id="test" onclick="autoTest()" style="cursor: pointer;"><img src="${ctx}resources/images/add.gif" width="10"height="10" />自动检测 &nbsp;</span></smt:verify>
													</span>
												</div>
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
							<tr style="padding-top: 2px">
								<td class="STYLE19" bgcolor="#FFFFFF" colspan="15">
									<span style="padding-left: 40px;">编号:<input type="text" name="filter_LIKES_icNo" value="${param['filter_LIKES_icNo']}" style="width: 80px"> </span>
									<span style="padding-left: 40px;">订单编号:<input type="text" name="filter_LIKES_orderNo" value="${param['filter_LIKES_orderNo']}" style="width: 80px"> </span>
									<span style="padding-left: 20px">状态: <select name="filter_EQS_status">
											<option value=""> 全部 </option>
											<option value="0" ${param['filter_EQS_status']=='0'?"selected":""}> 良品 </option>
											<option value="1" ${param['filter_EQS_status']=='1'?"selected":""}> 不良品</option>
											<option value="2" ${param['filter_EQS_status']=='2'?"selected":""}> 报废品</option>
										</select> </span>
									<span style="padding-left: 20px"><input type="button"
											name="" onclick="search();" value="查询"> </span>
								</td>
							</tr>
							<tr>
								<td width="5%" height="20" bgcolor="d3eaef" class="STYLE10">
									<div align="center">
										<input type="checkbox" name="checkbox" id="checkall"/>
									</div>
								</td>
								<td height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">板子编号</span>
									</div>
								</td>
								<td  height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">订单编号</span>
									</div>
								</td>
								<td  height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">MAC地址</span>
									</div>
								</td>
								<td  height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">MAC录入时间</span>
									</div>
								</td>
								<td  height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">PMON版本</span>
									</div>
								</td>
								<td  height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">程序版本</span>
									</div>
								</td>
								<td height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">系统名称</span>
									</div>
								</td>
								<td  height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
									    <span class="STYLE10">当前站点</span>
									</div>
								</td>
								<td  height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">状态</span>
									</div>
								</td>
								<td  height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">备注</span>
									</div>
								</td>
								<td height="20" bgcolor="d3eaef" class="STYLE6">
									<div align="center">
										<span class="STYLE10">基本操作</span>
									</div>
								</td>
							</tr>
							<c:forEach items="${page.result}" var="entity">
								<tr style="background-color: " >
									<td height="20" bgcolor="#FFFFFF">
										<div align="center">
											<input type="checkbox" name="objId" value="${entity.id}"/>
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE6">
										<div align="center">
											<span class="STYLE19">${entity.icNo}</span>
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center"> ${entity.orderEntity.orderNo} </div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center">
											${entity.macNo}
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center"><fmt:formatDate value="${entity.macDate}" pattern="yyyy-MM-dd hh:mm:ss"/></div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center"> ${entity.pmonVersion} </div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center"> ${entity.programVersion} </div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center"> ${entity.systemName} </div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center"> ${entity.flowTask==null?"":entity.flowTask.taskName} </div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center">${entity.status=="0"?"良品":entity.status=="1"?"不良":entity.status=="2"?"报废":""}
										</div>
									</td>
									<td height="20" bgcolor="#FFFFFF" class="STYLE19">
										<div align="center">${entity.remark}</div>
									</td>   
									<td height="20" bgcolor="#FFFFFF">
										<div align="center" class="STYLE21">
											 <smt:verify authority="board_modify"><a href="#" onclick="topTest(${entity.id})">检测</a></smt:verify>
											 <smt:verify authority="board_view"><a href="#" onclick="topNG(${entity.id})">NG</a></smt:verify>
										</div>
									</td>
								</tr>
							</c:forEach>
						</table> 
					</td>
				</tr>
				<tr>
					<td height="30">
						<%@include file="/WEB-INF/common/footer.jsp"%>
					</td>
				</tr>
			</form>
		</table>
	</body>
</html>